extends PanelContainer

@onready var count_label = $Label

var item_amount: int = 0

func _ready():
	clear_slot()

func set_item(amount: int):
	item_amount = amount
	update_count_display()

func update_count_display():
	if item_amount > 1:
		count_label.text = str(item_amount)
		count_label.show()
	else:
		count_label.text = ""
		count_label.hide()

func clear_slot():
	count_label.hide()

func get_item_info() -> Dictionary:
	return {
		"amount": item_amount
		}
